import { llmResultAuditHandler } from './demo/LLMChatAuditHandler';
import { ActionEnum, PayloadDataKeyEnum, PayloadDataValueType, RawRequest, AIResponse } from './sdk/RequestHandleSDK';


const SDKTool = {
  idePlatform: 'vscode',
  ideVersion: '1.0',
  pluginVersion: '1.0',
  user: {
    name: 'test-name',
    organizationId: 'test-org-id',
    organizationName: 'test-org-name',
    uid: 'test-uid',
  },
};
async function main() {
  const value2 = 'hello world';
  const dataMap = new Map<PayloadDataKeyEnum, PayloadDataValueType>();
  dataMap.set(PayloadDataKeyEnum.USER_INPUT, value2);

  const request: RawRequest = {
    action: ActionEnum.CODE_GENERATE_COMMENT,
    payload: {
      associatedContexts: [],
      data: dataMap,
    },
    requestId: 'test-request-id',
  };

  const aiResponse: AIResponse = {
    inferredResult: {
      text: 'reply hello world',
    },
  };

  const response = await llmResultAuditHandler.handle(request, aiResponse, SDKTool);
  console.log(response);
}

main();
